// 选择器
<template>
  <el-select
    v-model="currValue"
    v-bind="$attrs"
    @change="change"
  >
    <el-option v-for="item in options" :key="item.value" :value="item.value" :label="item.label" />
  </el-select>
</template>

<script>
export default {
  name: 'BaSelect',
  components: {},
  props: {
    options: {
      type: Array,
      default: () => []
    },
    value: {
      type: [String, Number],
      default: null
    },
    change: {
      type: Function,
      default: () => {}
    }
  },
  data () {
    return {}
  },
  computed: {
    currValue: {
      get () {
        // console.log('get ()', this.value)
        return this.value
      },
      set (value) {
        this.$emit('input', value)
      }
    }
  },
  watch: {},
  created () {},
  mounted () {},
  methods: {}
}
</script>

<style scoped lang="">

</style>
